#include "user_utilities.h"
#include "user_routines.h"
#include "ifi_aliases.h"

/*******************************************************************************
* FUNCTION NAME: difference
* PURPOSE:       returns the difference of 2 numbers
* CALLED FROM:   This file
* ARGUMENTS:     2 numbers
* RETURNS:       number
*******************************************************************************/
int difference(signed int A,signed int B)
{
	if (A > B)
	{
		return A - B;
	}

	if (B > A)
	{
		return B - A;
	}

	if (A == B)
	{
		return 0;
	}
}

/*******************************************************************************
* FUNCTION NAME: abs
* PURPOSE:       returns the absolute value of a signed int
* CALLED FROM:   This file
* ARGUMENTS:    1 numbers
* RETURNS:       int
*******************************************************************************/
int abs(signed int n)
{
	if (n > 0)
	{
		return (int)n;
	}
	else if (n==0)
	{
		return 0;
	}
	else if (n<0)
	{
		return (int)-n;
	}
}




